<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('绩效人员列表')"/>
    <th:block th:include="include :: layout-latest-css"/>
    <th:block th:include="include :: ztree-css"/>
    <th:block th:include="include :: select2-css"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="dept-form">
                <div class="select-list">
                    <ul>
                        <li>
                            参数名称：<input type="text" name="parameterName" id="parameterName"/>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: layout-latest-js"/>
<th:block th:include="include :: ztree-js"/>
<script th:inline="javascript">

    var prefix = ctx + "acvParameterManager"

    $(function () {
        var options = {
            code: "id",
            uniqueId: "id",
            url: prefix + "/list",
            createUrl: prefix + "/add/{id}",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove/{id}",
            modalName: "参数",
            columns: [
                {
                    field: 'id',
                    title: '主键'
                },
                {
                    field: 'parameter_name',
                    title: '参数名称'
                },
                {
                    field: 'parameter_typeName',
                    title: '参数类型'
                },
                {
                    field: 'parameter_value',
                    title: '参数值'
                },
                {
                    title: '操作',
                    align: 'left',
                    formatter: function (value, row, index) {
                        var actions = [];
                        var url = ctx + "acvParameterManager/edit?id=" + row.id;
                        var title = '修改参数配置';
                        actions.push('<a class="btn btn-success  btn-xs "href="javascript:void(0)" onclick="$.modal.open(\'' + title + '\',\'' + url + '\',500,500)"><i class="fa fa-plus"></i>编辑</a> ');
                        return actions.join('');
                    }
                }
            ]
        };
        $.table.init(options);
    });

</script>
</body>
</html>